let pattern = /[0-9]{4}(-[0-9]{2}){2}/g;

let str = "111 2019-07-12 09:27:00 2019-07-13 2019-05-12";

// let c = pattern.exec(str);
console.log(str.match(pattern));